package com.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value="stock-service",path = "/stock",fallback = StockFeignServiceFallback.class)//如果下游调用发生错误 调用备用方法 或者记录异常
public interface StockService {

    //声明
    @RequestMapping("/deduct")
     String deduct();
    @GetMapping("/deduct1")
     String deduct1();

}
